//
//  RootWireframe.m
//  ViperDemo
//
//  Created by Leeesven on 17/5/17.
//  Copyright © 2017年 Leeesven. All rights reserved.
//

#import "RootWireframe.h"

@implementation RootWireframe

-(void)showRootViewController:(UIViewController *)viewController inWindow:(UIWindow *)window{
    UINavigationController *navigationController = [self navigationControllerFromWindow:window];
    navigationController.viewControllers = @[viewController];
    
    [window makeKeyAndVisible];
}

- (UINavigationController *)navigationControllerFromWindow:(UIWindow *)window
{
    UINavigationController *navigationController = (UINavigationController *)[window rootViewController];
    
    return navigationController;
}

@end
